package com.viviman.service.impl;

import com.viviman.pojo.Order;
import com.viviman.service.OrderService;
import com.viviman.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;

/**
 * @author Vivim
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private ProductService productService;

    @Override
    public Order selectOrderById(Integer id) {
        return new Order(id, "测试123", "测试456", 20.0, Arrays.asList(productService.selectProductById(id)));
    }
}
